<template>
  <el-select v-model="checked" value-key="" placeholder="" clearable filterable>
    <el-option
      v-for="item in projects"
      :key="item.id"
      :label="item.project_name"
      :value="item.id"
    >
    </el-option>
  </el-select>
</template>

<script>
export default {
  props: {
    defaultProject: {
      type: [String, Number],
      default: 0,
    },
    projects: {
      type: Array,
      default: [],
    },
  },
  computed: {
    checked: {
      get() {
        return this.defaultProject;
      },
      set(val) {
        this.$emit("update:defaultProject", val);
      },
    },
  },
};
</script>

<style>
</style>